package session2;

public class ErFenSearch {
	private long[] a;
	private int nElems;		//number of data items
	
	public ErFenSearch(int max){
		a = new long[max];
		nElems = 0;
	}
	
	private int find(long searchKey){
		int lowerBound = 0 ;
		int upperBound = nElems -1;
		int curIn;
		
		while(true){
			curIn = (lowerBound + upperBound)/2;
			if(a[curIn] == searchKey){
				return curIn;
			} else if(lowerBound > upperBound){
				return nElems;
			} else {
				if(a[curIn]<searchKey){
					lowerBound = curIn + 1;
				} else {
					upperBound = curIn - 1;
				}
			}
		}
	}
	
	public static void main(String[] args) {
		System.out.println("hei");
	}

}
